package com.ueip.backend.controller;

import com.ueip.backend.vo.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

// 统一异常处理
@ControllerAdvice
public class MyControllerAdvice {

    @ExceptionHandler(Exception.class)
    public Result process(Exception e) {
        e.printStackTrace();
        return Result.error("服务器错误");
    }
}
